package com.mingqijia.gassafety.shared.constant.warnStrategy;

public enum WarnStrategyTypeEnum {

    LOW(1, "低报"),
    HIGH(2, "高报");

    /**
     * 编码
     */
    private Integer code;
    /**
     * 值
     */
    private String value;

    WarnStrategyTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    private static final WarnStrategyTypeEnum[] VALUES = WarnStrategyTypeEnum.values();

    public static WarnStrategyTypeEnum matcher(String code) {
        for (WarnStrategyTypeEnum ele : VALUES) {
            if (ele.code.equals(code)) {
                return ele;
            }
        }
        // code为 no正好为
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String interval) {
        this.value = value;
    }


}
